home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 65.zip
/
BS1 part 65
/
Math Visin v2.1 disk 2.adf
/
Arexx.CLI
/
tutorialexample.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-02-14
|
2KB
|
67 lines
/* TutorialExample, a sample ARexx program for MathVision.
This is a trivial program to draw a series of plots on the screen.
Feel free to put different numbers in the user settings sections, and
also note the Put Parameter Here section.
The idea of this program is that it draws a series of plots, using
a different parameter each time. The variable Pictures is the number of
steps to do it in, and ParameterStart and ParameterEnd are the starting
and ending values of the parameter. Be sure to use the parameter in
the Use Parameter Here section.
*/
/*============================== User Settings =============================*/
Pictures = 5 /* Number of pictures to plot */
ParameterStart = .7 /* start and end values for the parameter */
ParameterEnd = 1
/*==========================================================================*/
ADDRESS "MathVision"
OPTIONS RESULTS /* We need answers */
OPTIONS FAILAT 1 /* die on all errors */
SIGNAL ON ERROR /* go to error handler */
NUMERIC DIGITS 15 /* for small things */
StopSign "F"
/*----------- set up for this particular plot ----------*/
/* normally we just use whatever MathVision happens to have */
Overplot T
EraseScreen
PlotScreenToFront
SimpleSampleDelta 2
xmin 0
xmax 12.56
ymin "-1"
ymax 1
/*----------------------*/
DO PictureNumber = 0 TO Pictures-1 /* for each picture...*/
mult = (PictureNumber) / (Pictures-1) /* 0..1 */
parameter = ParameterStart + mult*(ParameterEnd - ParameterStart)
/*======================= USE PARAMETER HERE ========================== */
f0 "Sin(x)*"parameter
PlotSimple /* do the appropriate plot */
/*===================================================================== */
Get StopSign /* did user hit Ctrl-Esc ? */
IF RESULT = "T" THEN BREAK
END /* do */
WorkbenchScreenToFront
EXIT
ERROR: /* Error Diagnostic for return codes */
Get Diagnosis RC
SAY RESULT" on line "SIGL
EXIT